#!/bin/bash

# 极简 Git 推送脚本 - 推送到 master 分支
# 使用方法: ./quickpush.sh "提交信息"

[ $# -eq 0 ] && echo "❌ 请提供提交信息" && exit 1

# 获取当前分支，默认推送到 master
CURRENT_BRANCH=$(git branch --show-current 2>/dev/null || echo "develop")
TARGET_BRANCH="master"

echo "🚀 快速推送到 $TARGET_BRANCH 分支..."
git add .
git commit -m "$1"
git push origin $CURRENT_BRANCH:$TARGET_BRANCH
echo "✅ 已从 $CURRENT_BRANCH 推送到 $TARGET_BRANCH"